﻿using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using GMS.Framework.Utility;

namespace GMS.Core.Config
{
    [Serializable]
    public class DBConfig : ConfigFileBase
    {   
        public DBConfig() { }

        public List<DBInfo> dbs { get; set; }
    }

    [Serializable]
    public class DBInfo
    {
        private string _id = string.Empty;
        [XmlAttribute("id")]
        public string Id
        {   
            get { return _id; }
            set { _id = value; }
        }
        private string _name = string.Empty;
        [XmlAttribute("name")]
        public string Name
        {
            get { return _name; }
            set { _name = value; }
        }
        private string _text = string.Empty;
        [XmlAttribute("text")]
        public string Text
        {
            get { return _text; }
            set { _text = value; }
        }

        private string _url = string.Empty;
        [XmlAttribute("url")]
        public string Url
        {
            get { return _url; }
            set { _url = value; }
        }

        private string _accessToken = string.Empty;
        [XmlAttribute("accessToken")]
        public string AccessToken
        {
            get { return _accessToken; }
            set { _accessToken = value; }
        }
        

    }

    [Serializable]
    public class TenantSetting
    {
        private string _key = string.Empty;
        [XmlAttribute("key")]
        public string Key
        {
            get { return _key; }
            set { _key = value; }
        }

        private string _value = string.Empty;
        [XmlAttribute("value")]
        public string Value
        {
            get { return _value; }
            set { _value = value; }
        }

    }

}